// class API
import request from '@/utils/request'
// 获得全部课程 /getAllClass/:page/:size
export const getOrFindeAllClass = (data) => request({ url: `/api/home/classInfo`, method: 'post', data })
// 收藏课程  /api/personinfo/CollCurs?id={}
export const collectClass = (classId) => request({ url: `/api/personinfo/CollCurs?class_id=${classId}`, method: 'get' })
// 取消收藏 /api/personinfo/cancelCollCurs?id={}
export const cancelCollectClass = (classId) => request({ url: `/api/personinfo/cancelCollCurs?class_id=${classId}`, method: 'get' })
// 获得课程详情 /api/home/getClassdetail id get
export const getClassInfo = (classId) => request({ url: `/api/home/getClassdetail?class_id=${classId}`, method: 'get' })
// 获得用户预约课程 /api/home/getbookclassinfo
export const getUserBookClassList = (data) => request({ url: `/api/home/getbookclassinfo`, method: 'post', data })
// 选择老师 /api/home/choiceTeacher post
export const choiceTeacher = (data) => request({ url: `/api/home/choiceTeacher`, method: 'post', data })
// 首页课程表
export const getClassTable = () => request({ url: `/api/personinfo/getcousre`, method: 'get' })
// 购买课程 /api/personinfo/buyCurerencis
export const buyClass = (teacherId, timeDate) => request({ url: `/api/personinfo/buyCurerencis?teacherID=${teacherId}&start_time=${timeDate}` })
// 获得老师评价
export const getTeacherEvaluate = (classId, teacherId) => request({ url: `/api/personinfo/teaEvaluate?class_id=${classId}&teacher_id=${teacherId}` })
// 取消课程/api/personinfo/cancelCurerencis?class_id={}
export const cancelClass = (classId) => request({ url: `/api/personinfo/cancelCurerencis?class_id=${classId}`, method: 'get' })
// 提交学生评价 /api/personinfo/stuEvaluate post
export const sumbitStuEva = (data) => request({ url: `/api/personinfo/stuEvaluate`, method: 'post', data })
// 查看学生评价 /api/personinfo/Evaluate
export const selectStuEva = (classId, teacherId) => request({ url: `/api/personinfo/Evaluate?class_id=${classId}&teacher_id=${teacherId}`, method: 'get' })
